package com.twetec.cms.model.vo.website;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

/**
 * @Author: zhaichangzheng
 * @Date: 2022/2/9 11:28 （日期和时间）
 */
public class CmsMenuPermissionTreeVO implements Serializable {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "id", example = "1234567891")
    private Long id;

    @ApiModelProperty(value = "菜单权限名字", example = "栏目")
    private String name;

    @ApiModelProperty(value = "类型(ZHAN_DIAN站点，CAI_DAN菜单，CAO_ZUO操作，LAN_MU栏目)", example = "0")
    private String type;

    @ApiModelProperty(value = "父id", example = "1234567891")
    private Long pid;

    @ApiModelProperty(value = "权限树", example = "[" +
            "{" +
            "\"id\": 1440508157288644600," +
            "\"name\": \"友情链接\"," +
            "\"type\": CAI_DAN," +
            "\"pid\": 1234567891," +
            "\"childList\": []" +
            "}" +
            "]")
    private List<CmsMenuPermissionTreeVO> childList;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public List<CmsMenuPermissionTreeVO> getChildList() {
        return childList;
    }

    public void setChildList(List<CmsMenuPermissionTreeVO> childList) {
        this.childList = childList;
    }

    @Override
    public String toString() {
        return "CmsMenuPermissionTreeVO{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", type=" + type +
                ", pid=" + pid +
                ", childList=" + childList +
                '}';
    }
}
